// TTable.cpp

#include "includes.h"

TTable::TTable()
{
	memset(tTable, 0, sizeof(tTable)); //bzero is depricated, I had no idea

	printf("sizeof(tTable) = %i", sizeof(tTable));
}

TTableEntry * TTable::get(unsigned long inHash)
{
	unsigned int index = 0x1FFFFF & inHash; //lop the first 20 bits off
	if (!tTable[index].valid)
		return 0;
	else if (tTable[index].hash != inHash)
		return 0;
	else
		return &tTable[index];
}



